<!--气泡弹窗的按钮-->
<template>
  <div class="btn-pan">
    <Button id="locate" class="btn1" icon="md-ionic" :title="$t('location')" type="info" @click="btnClick('locate')"></Button>
    <Button id="liveVideo" class="btn1" icon="md-easel" :title="$t('real_time_video')" type="info" v-if="status==1" @click="btnClick('liveVideo')"></Button>
    <Button id="liveAudio"class="btn1" icon="md-volume-up" :title="$t('listen_into')" type="info" v-if="status==1" @click="btnClick('liveAudio')"></Button>
    <Button id="videoCall"class="btn1" icon="md-people" :title="$t('video_call')" type="info" v-if="status==1" @click="btnClick('videoCall')"></Button>
    <Button class="btn1" icon="md-mic" :title="$t('audio_call')" type="info" v-if="status==1" @click="btnClick('audioCall')"></Button>
    <Button class="btn1" disabled icon="md-reverse-camera" :title="$t('take_picture')" type="info" v-if="status==1" @click="btnClick('takePicture')"></Button>
    <Button class="btn1" disabled icon="ios-more" :title="$t('send_message')" type="info" v-if="0==1" @click="btnClick('issueMessage')"></Button>
    <Button class="btn1" icon="md-star-outline" :title="favroteTitle" type="info" @click="btnClick('favorite')"></Button>
    <Button class="btn1" icon="md-git-merge" :title="$t('track')" type="info" v-if="status==1" @click="btnClick('track')"></Button>
    <Button class="btn1" icon="md-people" :title="$t('near_by')" type="info" v-if="0==1" @click="btnClick('nearby')"></Button>
    <Button class="btn1" disabled icon="md-information" :title="$t('device_info')" type="info" @click="btnClick('deviceInfo')"></Button>
    <Button class="btn1" disabled icon="md-settings" :title="$t('system_setting')" v-if="0==1" type="info" @click="btnClick('devSetting')"></Button>
    <Button class="btn1" icon="md-videocam" :title="$t('record_play')" type="info" v-if="status==1" @click="btnClick('replay')"></Button>
  </div>
</template>

<script>
export default {
  name:"PoptipBtn",
  props:{
    status:{
      type: Number,
      default: 1
    },
    favroteTitle:{type:String,default: "Favrote"}
  },
  data(){
    return{

    }
  },
  methods:{
    btnClick(event){
      /**
       * locate 定位
       * liveVideo 实时视频
       * liveAudio 监听
       * videoCall 视频通话
       * audioCall 语音通话
       * takePicture 拍照
       * issueMessage 消息下发
       * favorite 收藏
       * track 跟踪
       * nearby 附近
       * deviceInfo 设备信息
       * replay 回放
       * devSetting 设置
       */
      //console.log(event);
      this.$emit('btnClick', event);
    }
  }
}

</script>
<style lang="less">
.btn-pan {
  display: flex;
  flex-wrap: wrap;
  margin-left: 0px;
  .btn1 {
    margin-left: 5px;
    margin-bottom: 2px;
  }
}
</style>
